<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/site/addsite" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>
<body>
  <div class="page">
    <div class="page-hd">
      <if condition="isset($appinfo)">
        <h1>修改网站</h1>
        <else/>
        <h1>添加网站</h1>
      </if>
    </div>
    <div class="navbar">
      <ul class="nav">
        <li><a href="{:URL('admin/Site/siteManager')}">网站列表</a>
        </li>
        <li class="active">
          <if condition="isset($appinfo)">
            <a href="{:URL('admin/Site/addSite')}">修改网站</a>
            <else/>
            <a href="{:URL('admin/Site/addSite')}">添加网站</a>
          </if>
        </li>
      </ul>
    </div>
    <div class="form">
      <if condition="isset($appinfo)">
        <form id="J_form" method="post" action="{:URL('admin/Site/editSite')}" enctype="multipart/form-data">
          <else/>
          <form id="J_form" method="post" action="{:URL('admin/Site/addSite')}" enctype="multipart/form-data">
      </if>
      <input type="hidden" name="siteappid" id="siteappid" value="{$appinfo.appid}" />
      <dl class="kv">
        <dt>
          <label for="">{$Think.lang.appName}：</label>
        </dt>
        <dd>
          <input class="input-text" name="appName" id="appName" type="text" value="{$appinfo.name}" required/>
          <span class="required">*</span>
          <div class="kv-error"></div>	
        </dd>
      </dl>
      <dl class="kv">
        <dt>
          <label for="">{$Think.lang.apps}{$Think.lang.url}：</label>
        </dt>
        <dd>
          <input class="input-text" name="appsUrl" id="appsUrl" type="text" value="{$appinfo.url}" required />
          <span class="required">*</span>
          <div class="kv-error"></div>	
        </dd>
      </dl>
      <dl class="kv">
        <dt>
          <label for="">{$Think.lang.apps}IP：</label>
        </dt>
        <dd>
          <input class="input-text" name="appsIp" id="appsIp" type="text" value="{$appinfo.ip}" />
        </dd>
      </dl>
      <dl class="kv">
        <dt>
          <label for="">{$Think.lang.communicationKey}：</label>
        </dt>
        <dd>
          <input class="input-text" name="communicationKey" id="communicationKey" type="text" value="{$appinfo.authkey}" />
        </dd>
      </dl>
      <div class="actions">
        <input type="submit" class="btn btn-y" value="{$Think.lang.OK}" />
      </div>
      </form>
    </div>
  </div>
</body>
</html>
